package pers.youqu.search.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.youqu.search.service.IndexesService;

/**
 * @author Jason
 * @version 1.0.0
 * @date 2020/12/13 10:13
 * @Description TODO
 */
@RestController
public class IndexesController {
    @Autowired
    private IndexesService indexesService;

    @GetMapping("/goods/init")
    public void initIndexes(){
        indexesService.deleteIndexes();
        indexesService.createdNewIndexes();
        indexesService.bulkInsertData();
    }
}
